<script>
	import config from './config'
	import {
		getToken
	} from '@/utils/auth'

	export default {
		onLaunch: function() {
			this.initApp()
		},
		methods: {
			// 初始化应用
			initApp() {
				// 初始化应用配置
				this.initConfig()
				// 检查用户登录状态
				//#ifdef H5
				this.checkLogin()
				//#endif
			},
			initConfig() {
				this.globalData.config = config
			},
			checkLogin() {
				// if (!getToken()) {
                //     this.$tab.reLaunch('/pages/login')
                // }
				// 默认进入首页，不在 H5 端强制跳转至登录
			}
		}
	}
</script>

<style lang="scss">
	@import '@/static/scss/index.scss';

	@font-face {
		font-family: 'harmonyosfont';
		src: url('https://www.ruilongan.com/profile/upload/HarmonyOS_Sans_SC_Regular.ttf') format('truetype');
	}

	html,
	body,
	input,
	view,
	textarea {
		font-family: harmonyosfont, sans-serif;
	}
</style>